package cn.meike.net.protocol;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

public class GMsgCodecFactory implements ProtocolCodecFactory
{

	private final GMsgDecoder m_decoder;
	
	private final GMsgEncoder m_encoder;
	
	public GMsgCodecFactory()
	{
		m_decoder = new GMsgDecoder();
		m_encoder = new GMsgEncoder();
	}
	
	@Override
	public ProtocolEncoder getEncoder(IoSession session) throws Exception 
	{
		return m_encoder;
	}

	@Override
	public ProtocolDecoder getDecoder(IoSession session) throws Exception 
	{
		
		return m_decoder;
	}

}
